<?php $this->Hinc('header')?>
<link href="/Public/Home/public/all_common.css" rel="stylesheet" type="text/css">
<div class="container" id="container">
    <h3 class="pro-title">商品列表</h3>
    <div class="filter-lists">
        <dl class="xlj-filter-list xlj-filter-list-first category-filter-list clearfix">
            <dt>商品分类：</dt>
            <dd>
                <ul id="typeCat" class="clearfix">
                    <li class="first "><a href="<?php $this->U('Index','lis')?>">全部</a></li>
                   <?php foreach($carr as $v){?>
                    <li class="first ">
                        <a href="<?php $this->U('Index','lis&fid='.$v['id'])?>"><?php echo $v['title']?></a>
                    </li>
                    <?php }?>
                </ul>
            </dd>
        </dl>
    </div>
    <div class="xlj-fitting">
        <span>排序方式：</span>
        <ul>
            <li>
                <?php if($_GET['order']=='money'&&$_GET['otype']=='desc'){?>
                    <a title="顺序" style="color: red;" href="<?php echo $url.'&order=money&otype=asc'?>">
                        <i></i>
                        按价格高低
                    </a>
                <?php }else{?>
                    <a title="倒序" style="color: #00B83F" href="<?php echo $url.'&order=money&otype=desc'?>">
                        <i></i>
                        按价格高低
                    </a>
                <?php }?>
            </li>

            <li>
                <?php if($_GET['order']=='id'&&$_GET['otype']=='desc'){?>
                <a title="顺序" style="color: red;" href="<?php echo $url.'&order=id&otype=asc'?>">
                    <i></i>
                    按上架时间
                </a>
                <?php }else{?>
                <a title="倒序" style="color: #00B83F" href="<?php echo $url.'&order=id&otype=desc'?>">
                    <i></i>
                    按上架时间
                </a>
                <?php }?>
            </li>
        </ul>

    </div>
    <div class="fitting-list-box clearfix">
        <div class="fitting-box">
            <ul>
                <?php foreach($goods as $v){?>
                <li class="tehui">
                    <div class="item-content" id="list_509">
                        <a class="fitting-img" href="<?php $this->U('Index','goods&id='.$v['id'])?>" title="<?php echo $v['name']?>">
                            <img  src="<?php echo substr(strrchr($v['img'],'|'),1)?>" alt="<?php echo $v['name']?>">
                        </a>

                        <span class="item-title"><?php echo $v['name']?></span>
                        <span class="item-price">￥<?php echo $v['money']?>元</span>

                        <a class="item-buy"  href="<?php $this->U('Index','goods&id='.$v['id'])?>">立即购买
                        </a>
                    </div>
                </li>
                <?php }?>
            </ul>
        </div>
    </div>


    <div id="pager" class="pagebar">

        <a href="<?php $urls=$_GET['order']?$url.'&order='.$_GET['order'].'&otype='.$_GET['otype']:$url;echo $urls.'&page='.$page['syy']?>" class="no">
            &lt;
        </a>
        <!--优化成百度分页-->
        <?php for($i=1;$i<=$page['zyy'];$i++){?>
            <a class="no" <?php if($i==$_GET['page']){echo "style='color:red'";}?> href="<?php $urls=$_GET['order']?$url.'&order='.$_GET['order'].'&otype='.$_GET['otype']:$url;echo $urls.'&page='.$i?>">
                <?PHP echo $i;?>
            </a>
        <?php }?>
        <a class="no" href="<?php $urls=$_GET['order']?$url.'&order='.$_GET['order'].'&otype='.$_GET['otype']:$url;echo $urls.'&page='.$page['xyy']?>">
            &gt;
        </a>
    </div>


</div>
<?php $this->Hinc('footer')?>
